One- and two-sample t tests.
نویسندگان
چکیده
The R function t.test() can be used to perform both one and two sample t-tests on vectors of data. The function contains a variety of options and can be called as follows: > t.test(x, y = NULL, alternative = c("two.sided", "less", "greater"), mu = 0, paired = FALSE, var.equal = FALSE, conf.level = 0.95) Here x is a numeric vector of data values and y is an optional numeric vector of data values. If y is excluded, the function performs a one-sample t-test on the data contained in x, if it is included it performs a two-sample t-tests using both x and y. The option mu provides a number indicating the true value of the mean (or difference in means if you are performing a two sample test) under the null hypothesis. The option alternative is a character string specifying the alternative hypothesis, and must be one of the following: "two.sided" (which is the default), "greater" or "less" depending on whether the alternative hypothesis is that the mean is different than, greater than or less than mu, respectively. For example the following call: > t.test(x, alternative = "less", mu = 10) performs a one sample t-test on the data contained in x where the null hypothesis is that =10 and the alternative is that <10. The option paired indicates whether or not you want a paired t-test (TRUE = yes and FALSE = no). If you leave this option out it defaults to FALSE. The option var.equal is a logical variable indicating whether or not to assume the two variances as being equal when performing a two-sample t-test. If TRUE then the pooled variance is used to estimate the variance otherwise the Welch (or Satterthwaite) approximation to the degrees of freedom is used. If you leave this option out it defaults to FALSE. Finally, the option conf.level determines the confidence level of the reported confidence interval for in the one-sample case and 1-2 in the two-sample case. A. One-sample t-tests Ex. An outbreak of Salmonella-related illness was attributed to ice cream produced at a certain factory. Scientists measured the level of Salmonella in 9 randomly sampled batches of ice cream. The levels (in MPN/g) were:
منابع مشابه
Testing for differentially expressed genes with microarray data.
This paper compares the type I error and power of the one- and two-sample t-tests, and the one- and two-sample permutation tests for detecting differences in gene expression between two microarray samples with replicates using Monte Carlo simulations. When data are generated from a normal distribution, type I errors and powers of the one-sample parametric t-test and one-sample permutation test ...
متن کاملEffects of Different Response Types on Iranian EFL Test Takers’ Performance
Test method facet is one of the factors which can have an influence on the test takers’ performance. The purpose of the current study was to investigate the effects of two different response types, multiple-choice cloze and multiple-choice test, on the pre-intermediate and intermediate test takers’ reading comprehension performance. To this end, 40 pre-intermediate and intermediate learners par...
متن کاملCorrecting Two-Sample z and t Tests for Correlation: An Alternative to One-Sample Tests on Difference Scores
In order to circumvent the influence of correlation in paired-samples and repeated measures experimental designs, researchers typically perform a one-sample Student t test on difference scores. That procedure entails some loss of power, because it employs N – 1 degrees of freedom instead of the 2N – 2 degrees of freedom of the independent-samples t test. In the case of non-normal distributions,...
متن کاملNull Hypothesis Significance Testing II Class 18 , 18
We continue our study of significance tests. In these notes we will introduce two new tests: one-sample t-tests and two-sample t-tests. You should pay careful attention to the fact that every test makes some assumptions about the data – often that is drawn from a normal distribution. You should also notice that all the tests follow the same pattern. It is just the computation of the test statis...
متن کاملNull Hypothesis Significance Testing II Class 18 , 18 . 05 Jeremy Orloff and Jonathan Bloom
We continue our study of significance tests. In these notes we will introduce two new tests: one-sample t-tests and two-sample t-tests. You should pay careful attention to the fact that every test makes some assumptions about the data – often that is drawn from a normal distribution. You should also notice that all the tests follow the same pattern. It is just the computation of the test statis...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Transfusion
دوره 57 10 شماره
صفحات -
تاریخ انتشار 2017